Rename signal location-selected to open-location
authorFederico Mena Quintero <federico@gnome.org>
Tue, 11 Dec 2012 18:09:13 +0000 (12:09 -0600)
committerFederico Mena Quintero <federico@gnome.org>
Tue, 11 Dec 2012 18:09:13 +0000 (12:09 -0600)
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
gtk/gtkfilechooserdefault.c
gtk/gtkplacessidebar.c

index 4c4e54f477f1231e7792a51cf52e77982302fe9f..cb126fa4143a96e5c125d19aef70bed139c107cf 100644 (file)
@@ -1276,7 +1276,7 @@ file_is_recent_uri (GFile *file)
 }
 
 static void
-places_sidebar_location_selected_cb (GtkPlacesSidebar *sidebar, GFile *location, GtkPlacesOpenMode open_mode, GtkFileChooserDefault *impl)
+places_sidebar_open_location_cb (GtkPlacesSidebar *sidebar, GFile *location, GtkPlacesOpenMode open_mode, GtkFileChooserDefault *impl)
 {
   gboolean clear_entry;
 
@@ -1320,8 +1320,8 @@ shortcuts_pane_create (GtkFileChooserDefault *impl,
   impl->places_sidebar = gtk_places_sidebar_new ();
   gtk_places_sidebar_set_show_cwd (GTK_PLACES_SIDEBAR (impl->places_sidebar), TRUE);
 
-  g_signal_connect (impl->places_sidebar, "location-selected",
-                   G_CALLBACK (places_sidebar_location_selected_cb),
+  g_signal_connect (impl->places_sidebar, "open-location",
+                   G_CALLBACK (places_sidebar_open_location_cb),
                    impl);
   g_signal_connect (impl->places_sidebar, "show-error-message",
                    G_CALLBACK (places_sidebar_show_error_message_cb),
index 20d8c9e2f0d563af937d4aad89364aa337d5f59b..78ed231aa25753d16bafd5dac777308f7c33f9b9 100644 (file)
@@ -146,7 +146,7 @@ struct _GtkPlacesSidebar {
 struct _GtkPlacesSidebarClass {
        GtkScrolledWindowClass parent;
 
-       void (* location_selected)     (GtkPlacesSidebar *sidebar,
+       void (* open_location)         (GtkPlacesSidebar *sidebar,
                                        GFile            *location,
                                        GtkPlacesOpenMode open_mode);
        void (* show_file_properties)  (GtkPlacesSidebar *sidebar,
@@ -203,7 +203,7 @@ typedef enum {
 } SectionType;
 
 enum {
-       LOCATION_SELECTED,
+       OPEN_LOCATION,
        SHOW_FILE_PROPERTIES,
        EMPTY_TRASH_REQUESTED,
        SHOW_ERROR_MESSAGE,
@@ -299,13 +299,13 @@ static GtkListStore *shortcuts_model_new (GtkPlacesSidebar *sidebar);
 G_DEFINE_TYPE (GtkPlacesSidebar, gtk_places_sidebar, GTK_TYPE_SCROLLED_WINDOW);
 
 static void
-emit_location_selected (GtkPlacesSidebar *sidebar, GFile *location, GtkPlacesOpenMode open_mode)
+emit_open_location (GtkPlacesSidebar *sidebar, GFile *location, GtkPlacesOpenMode open_mode)
 {
        if ((!sidebar->multiple_tabs_supported && open_mode == GTK_PLACES_OPEN_MODE_NEW_TAB)
            || (!sidebar->multiple_windows_supported && open_mode == GTK_PLACES_OPEN_MODE_NEW_WINDOW))
                open_mode = GTK_PLACES_OPEN_MODE_NORMAL;
 
-       g_signal_emit (sidebar, places_sidebar_signals[LOCATION_SELECTED], 0,
+       g_signal_emit (sidebar, places_sidebar_signals[OPEN_LOCATION], 0,
                       location, open_mode);
 }
 
@@ -1973,7 +1973,7 @@ change_location_and_notify (GtkPlacesSidebar *sidebar, GFile *location, GtkPlace
        if (location)
                sidebar->uri = g_file_get_uri (location);
 
-       emit_location_selected (sidebar, location, open_mode);
+       emit_open_location (sidebar, location, open_mode);
 }
 
 /* Callback from g_volume_mount() */
@@ -3741,11 +3741,11 @@ gtk_places_sidebar_class_init (GtkPlacesSidebarClass *class)
 
        /* FIXME: add docstrings for the signals */
 
-       places_sidebar_signals [LOCATION_SELECTED] =
-               g_signal_new (I_("location-selected"),
+       places_sidebar_signals [OPEN_LOCATION] =
+               g_signal_new (I_("open-location"),
                              G_OBJECT_CLASS_TYPE (gobject_class),
                              G_SIGNAL_RUN_FIRST,
-                             G_STRUCT_OFFSET (GtkPlacesSidebarClass, location_selected),
+                             G_STRUCT_OFFSET (GtkPlacesSidebarClass, open_location),
                              NULL, NULL,
                              _gtk_marshal_VOID__OBJECT_ENUM,
                              G_TYPE_NONE, 2,